// 请求响应参数（不包含data）
export interface Result {
  code: string;
  msg: string;
}

// 请求响应参数（包含data）
export interface ResultData<T = any> extends Result {
  forEach(arg0: (item: any) => void): unknown;
  data: T;
}

// 分页响应参数
export interface ResPage<T> {
  list: T[];
  pageNum: number;
  pageSize: number;
  total: number;
}

// 分页请求参数
export interface ReqPage {
  pageNum: number;
  pageSize: number;
}

// 文件上传模块
export namespace Upload {
  export interface ResFileUrl {
    fileUrl: string;
  }
}

// 登录模块
export namespace Login {
  export interface ReqLoginForm {
    username: string;
    password: string;
  }
  export interface ResLogin {
    access_token: string;
  }
  export interface ResAuthButtons {
    [key: string]: string[];
  }
}

// 用户管理模块
export namespace User {
  export interface ReqUserParams extends ReqPage {
    username: string;
    gender: number;
    idCard: string;
    email: string;
    address: string;
    createTime: string[];
    status: number;
  }
  export interface ResUserList {
    id: string;
    username: string;
    gender: number;
    user: { detail: { age: number } };
    idCard: string;
    email: string;
    address: string;
    createTime: string;
    status: number;
    avatar: string;
    photo: any[];
    children?: ResUserList[];
  }
  export interface ResStatus {
    userLabel: string;
    userValue: number;
  }
  export interface ResGender {
    genderLabel: string;
    genderValue: number;
  }
  export interface ResDepartment {
    id: string;
    name: string;
    children?: ResDepartment[];
  }
  export interface ResRole {
    id: string;
    name: string;
    children?: ResDepartment[];
  }
}
//监控设备模块
export namespace MonitioringProject{
  export interface ResMonitioringProjectList{
  mid:number;
  name:string
  }
}

//模型管理模块
export namespace Model {
  export interface ResModelInstanceList {
    version_id: number;
    version_name: string;
    entrain: string;
  }
  export interface ResModelList {
    model_id: number;
    model_name: string;
    versions?: ResModelInstanceList[];
  }
}
export namespace Dataset{
  export interface ResDatasetList{
    "datasetName": string, //数据集的名字
    "type": string, //数据集的文件类型
    "creatTime": string, //创建时间
    "rootPath": string, //所在根路径
    "numSamples": number, //数据集的样本数量
    "shape": string //数据集的形状
}
  export interface UpdateOrDeleteDatasetList{
    "type": string, //数据集的文件类型
    "creatTime": string, //创建时间
    "rootPath": string, //所在根路径
    "numSamples": number, //数据集的样本数量
    "shape": string //数据集的形状
    "datasetId": number //数据集的形状
  }


}

export namespace Param{
  export interface ResParamList{

    "description": string,
    "paramId": number,
    "paramName": string


  }

}

export namespace Device{
  export interface ResDeviceList{
    did:number,
    name:string,
    mid:number,
    devicePosition:number,
    areaId:number
  }
}

export namespace DeviceInformation{

  export interface ResDeviceInformationList{
    id:number,
    positionName:string,
    positionNumber:number,
    parsingFlag:number,
    identifierColumn:number,
    collectionMachineNumber:number,
    adNumber:number,
    displaySequence:number,
    adMin:number,
    adMax:number,
    alarmLowerLimit:number,
    alarmUpperLimit:number,
    roadMinimum:number,
    measurementUnit:number,
    coefficient:number,
    iniFileName:string,
    collectionBoardAddress:number,
    highFrequencyAnalogPeriod:number,
    turnoutCurveHighestCuttingLine:number,
    turnoutCurvePeakNumber:number,
    levelOneAlarmUpperLimit:number,
    levelOneAlarmLowerLimit:number,
    levelOneAlarmRoadLimit:number,
  }
}


export namespace ModelInstance{
  export interface ResModelInstanceList{
    modelInstanceId: number,
    datasetName: string,
    modelInstanceName: string,
    modelPath: string,
    trainRecordName: string,
    trainRecordPath: string

  }
  export interface updateModelInstanceList{
    datasetId: number,
    modelInstanceName: string,
    modelPath: string,
    datasetName: string,
    trainRecordName: string,
    trainRecordPath: string
    modelInstanceId: number,
    modelId: number
  }
}

export namespace ModelInstanceParam{
  export interface ResModelInstanceParamList{
    actualValue: number,
    paramName: string,
    description: string,
    id: number,
  }
  export interface updateModelInstanceParamList{
    actualValue: number,
    paramId: number,
    modelInstanceId: number,
    id: number,
    paramName: string,

  }
}

export namespace MysqlBack{
  export interface ResMysqlBackList{
    id:number,
    size: string,
    createTime: string,
    file: string,
    databaseName:string
  }

}
